package inabit.impl.data;

import inabit.data.Variable;
import inabit.fuzzy.data.FuzzySet;
import inabit.impl.data.types.NumericType;

/**@author Rafael Rocha*/
public abstract class NumericVariable extends Variable{
	private FuzzySet set;
	public NumericVariable(String id, NumericType type) {
		super(id, type);
	}
	public FuzzySet getFuzzySet() {
		return set;
	}
	public void setFuzzySet(FuzzySet set){
		this.set = set;
	}

	public String getEstimatedValue() {
		if(getValue() == null) {
			if(set != null) {
				return Double.toString(set.deffuzify());
			}
		}else {
			return getValue();
		}
		return null;
	}

}
